package cn.coder.jdbc2.config.builder;

import cn.coder.jdbc2.config.MappedStatement;
import cn.coder.jdbc2.config.SqlSource;

public class MappedStatementBuilder {
	private MappedStatement mappedStatement = new MappedStatement();

	public MappedStatementBuilder id(String id) {
		mappedStatement.setId(id);
		return this;
	}

	public MappedStatementBuilder parameterTypeClass(Class<?> parameterTypeClass) {
		mappedStatement.setParameterTypeClass(parameterTypeClass);
		return this;
	}

	public MappedStatementBuilder resultTypeClass(Class<?> resultTypeClass) {
		mappedStatement.setResultTypeClass(resultTypeClass);
		return this;
	}

	public MappedStatementBuilder statementType(String statementType) {
		mappedStatement.setStatementType(statementType);
		return this;
	}

	public MappedStatementBuilder sqlSource(SqlSource sqlSource) {
		mappedStatement.setSqlSource(sqlSource);
		return this;
	}

	public MappedStatement builder() {
		return mappedStatement;
	}
}
